package com.deer.wms.ASN.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.deer.wms.ASN.manage.dao.RequestBuyDetailMapper;
import com.deer.wms.ASN.manage.model.buy.RequestBuyDetail;
import com.deer.wms.ASN.manage.model.buy.RequestBuyDetailCriteria;
import com.deer.wms.ASN.manage.model.buy.RequestBuyDetailDto;
import com.deer.wms.ASN.manage.service.RequestBuyDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by guo on 2020/01/02.
 */
@Service
@Transactional
public class RequestBuyDetailServiceImpl extends ServiceImpl<RequestBuyDetailMapper, RequestBuyDetail> implements RequestBuyDetailService {

    @Autowired
    private RequestBuyDetailMapper requestBuyDetailMapper;


    @Override
    public List<RequestBuyDetailDto> findList(RequestBuyDetailCriteria criteria){
       return requestBuyDetailMapper.findList(criteria);
    }

    @Override
    public List<RequestBuyDetail> findByBillNo(String billNo) {
        return requestBuyDetailMapper.findByBillNo(billNo);
    }

    @Override
    public RequestBuyDetail findByDetailNo(String detailNo) {
        return requestBuyDetailMapper.findByDetailNo(detailNo);
    }


    @Override
    public void deleteByBillNo(String billNo) {
        requestBuyDetailMapper.deleteByBillNo(billNo);
    }

}
